<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="box"style='width: 200px;height: 100px; background: #ccc;'>
    <p>fgfgfdgr</p></div>
</body><script>
   var obox = document.querySelector('.box')
   //console.log(obox.style.width)
    obox.style.width='400px'
    obox.style.border='solid red 10px '
    obox.style.border=''
    console.log(obox.style.fontSize)
    //非行类
    console.log(getComputedStyle(obox).fontSize)
    console.log(getComputedStyle(obox).color)
</script>
</html>